

#ifndef _MAINWINDOW_H_
#define _MAINWINDOW_H_

#include "WidgetsApi.hpp"
#include "../OLCore/AbstractWindow.hpp"

#include <QPoint>
#include <QCloseEvent>
#include <QByteArray>
#include <QMouseEvent>

namespace NSRibbon {
	class RibbonStyle;
}

namespace NSWidgets {

	class EventBar;
	class SystemBar;
	class CircularMenu;

	class PyConsoleWidget;
	class CentralWidget;
	class MessageWidget;
	class ProjectTreeWidget;


	class WIDGETSAPI MainWindow : 
		public NSCore::AbstractWindow
	{
		Q_OBJECT
	private:
		EventBar* m_eventbar;
		SystemBar* m_systembar;
		CircularMenu* m_circular_menu;

		NSRibbon::RibbonStyle* m_ribbon;

		PyConsoleWidget* m_python_widget;
		CentralWidget* m_central_widget;
		MessageWidget* m_message_widget;
		ProjectTreeWidget* m_projecttree_widget;

	signals:
		void actionSaveData();

	public:
		
	private:
		void subWidgetInit();

	public:
		MainWindow(QWidget* w = nullptr);
		~MainWindow();

	public: /*override*/
		virtual inline QString className() override { return "MainWindow"; };

	protected:
		QPoint StartPos;
		bool m_isMaximized{ false };
		void closeEvent(QCloseEvent* event) override;
		bool nativeEvent(const QByteArray& eventType, void* message, long* result) override;
		bool eventFilter(QObject* watched, QEvent* event) override;

	};

}

#endif

